<!doctype html>
<html class="no-js " lang="en">
<head>
<meta charset="utf-8">

	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>默笙后台管理系统</title>
	<link rel="icon" type="image/ico" href="{$Think.const.SET_URL}/assets/images/favicon.ico" />
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="{$Think.const.SET_URL}/assets/js/vendor/bootstrap/bootstrap.min.css">
	<!-- vendor css files -->
	<link rel="stylesheet" href="{$Think.const.SET_URL}/assets/css/vendor/animsition.min.css">
	<link rel="stylesheet" href="{$Think.const.SET_URL}/assets/js/vendor/footable/css/footable.core.min.css">
	<!-- project main css files -->
	<link rel="stylesheet" href="{$Think.const.SET_URL}/assets/css/main.css">
	<!--/ stylesheets -->
</head>

<body id="falcon" class="main_Wrapper">

	<!--  Application Content  -->
	<div id="wrap" class="animsition">

		<!-- 头部 -->
        <div id="header">
            <header class="clearfix">
                <!-- Logo -->
                <div class="branding">
                    <a class="brand" href="index.html">
                        <span>默笙</span>
                    </a>
                    <a role="button" tabindex="0" class="offcanvas-toggle visible-xs-inline">
                        <i class="fa fa-bars"></i>
                    </a>
                </div>
                <!-- logo end -->

                <!-- 左侧导航 -->
                <ul class="nav-left pull-left list-unstyled list-inline">
                    <li class="leftmenu-collapse">
                        <a role="button" tabindex="0" class="collapse-leftmenu">
                            <i class="fa fa-outdent"></i>
                        </a>
                    </li>
                    <li class="dropdown leftmenu-collapse">
                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-language"></i>
                        </a>
                        <div class="dropdown-menu pull-left panel-default pt-0 pb-0" role="menu">
                            <ul class="list-group mb-0">
                                <li class="list-group-item">
                                    <a href="javascript:void(0);" class="p-0 m-0" >中文</a>
                                </li>
                                <li class="list-group-item">
                                    <a href="javascript:void(0);" class="p-0 m-0" >中文</a>
                                </li>
                                <li class="list-group-item">
                                    <a href="javascript:void(0);" class="p-0 m-0" >中文</a>
                                </li>
                                <li class="list-group-item">
                                    <a href="javascript:void(0);" class="p-0 m-0" >中文</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    
                </ul>
                <!-- 左侧导航 end -->
                <div class="search" id="main-search">
                    <input type="text" class="form-control underline-input" placeholder="输入内容来搜索">
                </div>
                <!-- 搜索结束 end -->

                <!-- Right-side navigation -->
                <ul class="nav-right pull-right list-inline">
                    
                   
                    <li class="dropdown notifications">
                        <a href="{:U('index/LoginOut')}" class="dropdown-toggle" >
                            <i class="fa fa-sign-out"></i>
                            <div class="notify">
                                <span class="heartbit"></span>
                                <span class="point"></span>
                            </div>
                        </a>
                        
                    </li>
                </ul>
                <!-- Right-side navigation end -->
            </header>
        </div>
        <!--/ 头部结束  -->

		<!-- CONTROLS Content -->
		<div id="controls">
			<!--SIDEBAR Content -->
			 <aside id="leftmenu">
                <div id="leftmenu-wrap">
                    <div class="panel-group slim-scroll" role="tablist">
                        <div class="panel panel-default">
                            <div id="leftmenuNav" class="panel-collapse collapse in" role="tabpanel">
                                <div class="panel-body">
                                    <!--  导航内容 -->
                                    <include file="public/menu" />
                                    <ul id="navigation">
                                        <li>
                                            <a href="{:U('index/index')}">
                                                <i class="fa fa-dashboard"></i>
                                                <span>仪表盘</span>
                                            </a>
                                        </li>
                                        
                                        <li>
                                            <a href="{:U('index/insta')}">
                                                <i class="fa fa-cogs"></i>
                                                <span>接口状态管理</span>
                                            </a>
                                        </li>
                                        <li class="active open">
                                            <a role="button" tabindex="0">
                                                 <i class="fa fa-delicious"></i>
                                                <span>用户管理</span>
                                            </a>
                                            <ul>
                                                <li class="active">
                                                    <a href="{:U('user/index')}">
                                                        <i class="fa fa-angle-right"></i>用户列表</a>
                                                </li>
                                                <li>
                                                    <a href="{:U('user/addkami')}">
                                                        <i class="fa fa-angle-right"></i>卡密生成</a>
                                                </li>
                                                <li>
                                                    <a href="{:U('user/kmlist')}">
                                                        <i class="fa fa-angle-right"></i>卡密列表</a>
                                                </li>
                                            </ul>
                                        </li>
                                        
                                        <li>
                                            <a role="button" tabindex="0">
                                                <i class="fa fa-lock"></i>
                                                <span>系统设置</span>
                                            </a>
                                            <ul>
                                                <li>
                                                    <a href="{:U('system/index')}">
                                                        <i class="fa fa-angle-right"></i>修改密码</a>
                                                </li>
                                                <li>
                                                    <a href="{:U('system/loginep')}">
                                                        <i class="fa fa-angle-right"></i>基本设置</a>
                                                </li>
                                                
                                            </ul>
                                        </li>
                                        <li>
                                            
                                            <a href="{:U('index/LoginOut')}">
                                                <i class="fa fa-sign-out"></i>
                                                <span>退出登陆</span>
                                            </a>
                                            
                                        </li>
                                    </ul>
                                    <!--/ 导航结束 -->
                                </div>
                            </div>
                        </div>
                        <div class="panel settings panel-default">
                            <div class="panel-heading" role="tab">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse" href="#leftmenuControls">设置
                                        <i class="fa fa-angle-up"></i>
                                    </a>
                                </h4>
                            </div>
                            <div id="leftmenuControls" class="panel-collapse collapse in" role="tabpanel">
                                <div class="panel-body">
                                    <div class="form-group">
                                        <div class="row">
                                            <label class="col-xs-8">打开</label>
                                            <div class="col-xs-4 control-label">
                                                <div class="togglebutton">
                                                    <label>
                                                        <input type="checkbox" checked="">
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <label class="col-xs-8">关闭</label>
                                            <div class="col-xs-4 control-label">
                                                <div class="togglebutton">
                                                    <label>
                                                        <input type="checkbox">
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="milestone-sidbar">
                                <div class="text-center-folded">
                                    <span class="pull-right pull-none-folded">60%</span>
                                    <span class="hidden-folded">CPU</span>
                                </div>
                                <div class="progress progress-xxs m-t-sm dk">
                                    <div class="progress-bar progress-bar-info" style="width: 60%;"> </div>
                                </div>
                                <div class="text-center-folded">
                                    <span class="pull-right pull-none-folded">35%</span>
                                    <span class="hidden-folded">内存</span>
                                </div>
                                <div class="progress progress-xxs m-t-sm dk">
                                    <div class="progress-bar progress-bar-primary" style="width: 35%;"> </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </aside>
			<!--/ SIDEBAR Content -->

			<!--RIGHTBAR Content -->
			
			<!--/ RIGHTBAR Content -->
		</div>
		<!--/ CONTROLS Content -->

		<!--  CONTENT  -->
		<section id="content">
			<div class="page page-tables-footable">
				<!-- bradcome -->
				<div class="b-b mb-10">
					<div class="row">
						<div class="col-sm-6 col-xs-12">
							<h1 class="h3 m-0">用户管理</h1>
							<small class="text-muted">用户列表</small>
						</div>
					</div>
				</div>

				<!-- row -->
				<div class="row">
					<div class="col-md-12">
						<section class="boxs ">
							<div class="boxs-header">
								<h3 class="custom-font hb-cyan">
									<strong>用户列表</strong> </h3>
                                    
							</div>
                            <div class="ripple-container">
                                
                            </div>
							<div class="boxs-body">
                            
								<div class="form-group">
									<label for="filter" style="padding-top: 5px">搜索:</label>
									<input id="filter" type="text" class="form-control rounded w-md mb-10 inline-block" />
								</div>
								<table id="searchTextResults" data-filter="#filter" data-page-size="5" class="footable table table-custom">
									<thead>
										<tr>
                                            <th>ID</th>
											<th>用户名</th>
                                            <th>QQ</th>
											<th>状态</th>
                                            <th>是否会员</th>
											<th data-hide='phone, tablet'>操作</th>
										</tr>
									</thead>
									<tbody>
                                        <volist name="list" id="vo">
										<tr>
                                            <td>{$vo.id}</td>
											<td>{$vo.username}</td>
                                            <td>{$vo.qq}</td>
											<td>
                                                <eq name="vo.status" value="0">
                                                <!-- <button class="btn btn-raised btn-info btn-xs">正常</button> -->
                                                <span class="label label-info">正常</span>
                                                </eq>
                                                <eq name="vo.status" value="1">
                                                <!-- <button class="btn btn-raised btn-primary btn-xs">禁用</div></button> -->
                                                <span class="label label-primary">禁用</span>
                                                </eq>
                                            </td>
											<td>
                                                <eq name="vo.isvip" value="0">
                                                <!-- <button class="btn btn-raised btn-info btn-xs">正常</button> -->
                                                <span class="label label-info">是</span>
                                                </eq>
                                                <eq name="vo.isvip" value="1">
                                                <!-- <button class="btn btn-raised btn-primary btn-xs">禁用</div></button> -->
                                                <span class="label label-primary">否</span>
                                                </eq>
                                            </td>
											<td>
                                                <eq name="vo.status" value="0">
                                                    <a onClick="ty_jy(this,'{$vo.id}')" class="label label-success">禁用</a>
                                                </eq>
                                                <eq name="vo.status" value="1">
                                                    <a onClick="ty_qy(this,'{$vo.id}')" class="label label-success">启用</a>
                                                </eq>
                                                <a onClick="ty_del(this,'{$vo.id}')" class="label label-warning">删除</a>
                                                <a onClick="ty_pass(this,'{$vo.id}')" class="label label-denger">重置密码</a>
                                            </td>
										</tr>
										</volist>
									</tbody>
									<tfoot class="hide-if-no-paging">
										<tr>
											<td colspan="5" class="text-right">
												<ul class="pagination">
												</ul>
											</td>
										</tr>
									</tfoot>
								</table>
							</div>
						</section>
					</div>
				</div>
			</div>
		</section>
		<!--/ CONTENT -->

	</div>
	<!--/ Application Content -->

	<!--  Vendor JavaScripts  -->
	<script src="{$Think.const.SET_URL}/assets/bundles/libscripts.bundle.js"></script>
	<script src="{$Think.const.SET_URL}/assets/bundles/vendorscripts.bundle.js"></script>
	<script src="{$Think.const.SET_URL}/assets/js/vendor/footable/footable.all.min.js"></script>
	<!--/ vendor javascripts -->
    <script src="{$Think.const.SET_URL}/assets/layer.js"></script>
	<!--  Custom JavaScripts  -->
	<script src="{$Think.const.SET_URL}/assets/bundles/mainscripts.bundle.js"></script>	<!-- Custom Js -->

	<!--  Page Specific Scripts  -->
	<script >
		$(window).load(function () {
			$('.footable').footable();
		});
	</script>
    <script type="text/javascript">
        function ty_del(obj, id) {
            var id = id;
            layer.confirm('确认要删除吗？如果该用户是会员则会删除会员信息', function (index) {

                $.ajax({
                    type: 'POST',
                    url: '{:U('user/userdel')}',
                    dataType: 'json',
                    data: { id: id },
                    success: function (data) {
                        console.log(data);
                        if (data.status == '1') {
                            layer.msg(data.info);//layer.msg('不开心。。', {icon: 5});
                            window.location.reload();
                        } else {
                            layer.msg(data.info);
                        }
                    },
                    error: function (data) {
                        layer.msg('删除失败!');
                    },
                });
            });
        }
        //禁用
        function ty_jy(obj, id) {
            var id = id;
            layer.confirm('确认设置为禁用吗？', function (index) {

                $.ajax({
                    type: 'POST',
                    url: '{:U('user/userjy')}',
                    dataType: 'json',
                    data: { id: id },
                    success: function (data) {
                        console.log(data);
                        if (data.status == '1') {
                            layer.msg(data.info);//layer.msg('不开心。。', {icon: 5});
                            window.location.reload();
                        } else {
                            layer.msg(data.info);
                        }
                    },
                    error: function (data) {
                        layer.msg('设置失败!');
                    },
                });
            });
        }
        //启用
        function ty_qy(obj, id) {
            var id = id;
            layer.confirm('确认设置为启用吗？', function (index) {

                $.ajax({
                    type: 'POST',
                    url: '{:U('user/userqy')}',
                    dataType: 'json',
                    data: { id: id },
                    success: function (data) {
                        console.log(data);
                        if (data.status == '1') {
                            layer.msg(data.info);//layer.msg('不开心。。', {icon: 5});
                            window.location.reload();
                        } else {
                            layer.msg(data.info);
                        }
                    },
                    error: function (data) {
                        layer.msg('设置失败!');
                    },
                });
            });
        }
        //重置密码
        function ty_pass(obj, id) {
            var id = id;
            layer.confirm('确认该用户重置密码为：123456？', function (index) {

                $.ajax({
                    type: 'POST',
                    url: '{:U('user/usercpass')}',
                    dataType: 'json',
                    data: { id: id },
                    success: function (data) {
                        console.log(data);
                        if (data.status == '1') {
                            layer.msg(data.info);//layer.msg('不开心。。', {icon: 5});
                            window.location.reload();
                        } else {
                            layer.msg(data.info);
                        }
                    },
                    error: function (data) {
                        layer.msg('设置失败!');
                    },
                });
            });
        }
    </script>
</body>
</html>